<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;

class User extends Authenticatable
{
    use HasFactory, HasApiTokens, Notifiable;

    /**
     * 可填充字段，允许批量赋值。
     */
    protected $fillable = ['name', 'nickname', 'email', 'password', 'avatar'];

    /**
     * 隐藏字段，在序列化时不会包含这些字段。
     */
    protected $hidden = [
        'password',
        'remember_token',
    ];

}
